/*=========================================================================

Program:   Virtual Surgery
Language:  C++
Date:      2009-9-1
Version:   0.1
Mail:		   nelfylee@gmail.com

Copyright (c) 2009 Nelfy Lee. All rights reserved.

=========================================================================*/
#ifndef _MAIN_WINDOW_H_
#define _MAIN_WINDOW_H_

#include "ToolBar.h"
#include "ProgressBar.h"

#include <QList>
#include <QMenu>
#include <QMap>
#include <QSize>
#include <QLabel>
#include <QMainWindow>

class SourcePipelineDock;
class ControlPanelDock;
class PropertyPanelDock;
class DisplayFramework;
class PipelineTreeView;
class PipelineModel;
class DisplayModel;
class SourceIO;



class MainWindow : public QMainWindow
{
	Q_OBJECT

public:
	MainWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
	~MainWindow();
	void postShow();

public slots:
	void setDockOptions();
	void openDicomDir();
	void openFile();
	void openTesting();
	void saveSource();
	void removeSource();

	void slotProgressStart(QString);
	void slotProgressUpdate(int value);
	void slotProgressDone();

	void slotChangeTitleInfo(const QString&);
	//void slotSourceSelected(const QModelIndex& index);

signals:
		void loadData();

private:
	void setupToolBar();
	void setupMenuBar();
	void setupDockWidgets();
	void setupPanels();
	void setupStatusbar();
	


private:
	QMenu *m_viewMenu;
	SourcePipelineDock *m_pipelineDock;			//dock widget
	ControlPanelDock *m_controlPanelDock;			// dock widget
	PropertyPanelDock *m_propertyPanelDock;
	//ToolBar* g_toolBar;
	ProgressBar *m_progressBar;
	DisplayFramework *m_displayFramework;
	DisplayModel *m_displayModel;
	PipelineModel *m_pipeline;
	PipelineTreeView *m_pipelineTreeView;
	SourceIO *m_sourceIO;
	QLabel *m_labelStatusMsg;
	QString m_titleInfo;
};


#endif
